import { createRouter, createWebHistory } from 'vue-router'
import Login_user from '@/views/Login/login_user.vue'
import Home from '@/views/Page/Home_page.vue'
import Personal_page from '@/views/Page/Personal_page.vue'
import post_page from '@/views/Page/post_page.vue'
import myEditor from '@/components/myEditor.vue'
import release_page from '@/views/Page/release_page.vue'
import post_detail from '@/views/Page/post_detail.vue'
import lates_post from '@/components/lates_post.vue'
import other_user from '@/views/Page/other_user.vue'
import message_page from '@/views/Page/message_page.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Login_user',
      component: Login_user
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/personal_page',
      name: 'Personal_page',
      component: Personal_page,
    },
    {
      path: '/post_page',
      name: 'Post_page',
      component: post_page
    },
    {
      path: '/editor',
      name: 'Editor',
      component: myEditor
    }, {
      path: `/release_page`,
      name: 'Release_page',
      component: release_page
    }, {
      path: `/post_detail/:id/:userId`,
      name: 'Post_detail',
      component: post_detail
    }, {
      path: `/lates_post/:tag_name?`,
      name: 'Lates_post',
      component: lates_post
    }, {
      path: `/other_user/:userId`,
      name: 'Other_user',
      component: other_user
    }, {
      path: `/message_page`,
      name: 'Message_page',
      component: message_page
    }
  ]
})

export default router
